<%= javascript_include_tag "tabs" %>

<% content_for :head do %>
  <%= stylesheet_link_tag "ui-lightness/jquery-ui-1.8.1.custom" %>
<% end %>

<%= content_tag :h1, t(:device, :count => 2) %>

<% if @devices.size > 0 %>
  <div class="hastabs basic-form">
    <% @devices_by_room.each_pair do |room, devices| %>
      <%= render "devices_panel", :room => room, :devices => devices, :house => @house, :user => @user %>
    <% end %>
  </div>
<% end %>

<% content_for :navigation do %>
  <% render :layout => "layouts/main_navigation" do %>
    <%= render :partial => "layouts/navigation/devices_item", :locals => {:classes => "selected tab-separator", :house => @house, :user => @user} %>
  <% end %>
<% end %>


<% content_for :sub_navigation do %>
  <div id="sub-tabs">
    <ul>
      <%= render :partial => "layouts/navigation/add_edit_discover_item", :locals => {:classes => "tab-separator", :house => @house, :user => @user} %>
    </ul>
  </div>
<% end %>